package com.baizhiedu;

import com.baizhiedu.bean.User;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Service;

/**
 * 功能：
 * 作者：HZj
 * 日期：2025/1/5 20:07
 */
/*
* @ComponentScan注解在配置bean中进行使用，等同于XML配置文件中的<context:component-scan>标签
*
* 目的：进行相关注解的扫描
*/
@Configuration
/*@ComponentScan(basePackages = "com.baizhiedu.scan",
        excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION,value = Service.class),
                          @ComponentScan.Filter(type = FilterType.ASPECTJ, pattern = "*..User1")}
)*/
/*@ComponentScan(basePackages = "com.baizhiedu.scan",
               useDefaultFilters = false,
               includeFilters = {
                        @ComponentScan.Filter(type = FilterType.ANNOTATION,value = Service.class),
                        @ComponentScan.Filter(type = FilterType.ASPECTJ,pattern = "*..User1")
                }
)*/
@ComponentScan(basePackages = "com.baizhiedu.scan")
@Import(User.class)
public class AppConfig2 {
}
